*******
* Generate dayrate visualization of the contract data
*******
import delimited "./data_py/processed/contracts_final.csv", clear

replace day_rate = day_rate * 1000000
drop date
g date = date(fixture_date, "YMD")
g month1 = date(month, "YMD")

sort date

twoway 	(lpolyci day_rate date, yaxis(1) color(blue) fcolor(ltblue) msize(vsmall) lpattern(shortdash)) ///
		(line gas month1, yaxis(2) color(gs5) lwidth(medium) ), ///
		ylabel(0(50000)150000, axis(1) nogrid) ylabel(0(5)15, axis(2) nogrid) xtitle("Year") ytitle("Rig Price (USD/day)") xlabel(14610(1000)18000,format(%td_CY)) ///
		ytitle(Rig Price, axis(1)) ytitle(Gas Price, axis(2)) ///
		legend(region(lcolor(white)) order(2 3) lab(3 "Natural Gas Price (USD)") lab(2 "Rig Price (USD/day)") ring(0) position(8)) ///
		graphregion(color(white))

*graph display, xsize(6.5) ysize(6)

display "`1'"
graph export `1', replace
